import { PersistGate } from 'redux-persist/integration/react'
import { persistStore } from 'redux-persist'
import ReactDOM from 'react-dom/client'
import { Provider } from 'react-redux'
import { store } from 'store'
import App from './App'
import myLog from 'utils/myLog'
import 'i18n'

const root = ReactDOM.createRoot(document.getElementById('root') as HTMLDivElement)
const persistor = persistStore(store)
myLog.success('欢迎使用『sign-search 符号搜素器』', true)
myLog.primary('愿你出走半生，归来仍是少年！')

root.render(
  <Provider store={store}>
    <PersistGate loading={null} persistor={persistor}>
      <App />
    </PersistGate>
  </Provider>
)
